<div class="btn-group">
    <?= ($dataPage->pageIndex > 3) ? '<a onclick="page(1)" class="btn btn-default"><<</a>' : '' ?>
    <?= ($dataPage->pageIndex > 2) ? '<a onclick="page(' . ($dataPage->pageIndex - 1) . ')" class="btn btn-default"><</a>' : '' ?>
    <?= ($dataPage->pageIndex > 3) ? '<a class="btn btn-default">...</a>' : '' ?>
    <?= ($dataPage->pageIndex >= 3) ? '<a onclick="page(' . ($dataPage->pageIndex - 2) . ')" class="btn btn-default">' . ($dataPage->pageIndex - 2) . '</a>' : '' ?>
    <?= ($dataPage->pageIndex >= 2) ? '<a onclick="page(' . ($dataPage->pageIndex - 1) . ')" class="btn btn-default">' . ($dataPage->pageIndex - 1) . '</a>' : '' ?>
    <a class="btn btn-primary"><?= $dataPage->pageIndex ?></a>
    <?= (($dataPage->pageCount - $dataPage->pageIndex) >= 1) ? '<a onclick="page(' . ($dataPage->pageIndex + 1) . ')" class="btn btn-default">' . ($dataPage->pageIndex + 1) . '</a>' : '' ?>
    <?= (($dataPage->pageCount - $dataPage->pageIndex) >= 2) ? '<a onclick="page(' . ($dataPage->pageIndex + 2) . ')" class="btn btn-default">' . ($dataPage->pageIndex + 2) . '</a>' : '' ?>
    <?= (($dataPage->pageCount - $dataPage->pageIndex) > 4) ? '<a class="btn btn-default">...</a>' : '' ?>
    <?= (($dataPage->pageCount - $dataPage->pageIndex) > 2) ? '<a onclick="page(' . ($dataPage->pageIndex - 1) . ')" class="btn btn-default">></a>' : '' ?>
    <?= (($dataPage->pageCount - $dataPage->pageIndex) > 2) ? '<a onclick="page(1)" class="btn btn-default">>></a>' : '' ?>
</div>